package Competition;

/**
 * @BelongsProject: SeniorArchitect-LeetCode
 * @BelongsPackage: Competition
 * @Author: zhuangxiaoyan
 * @CreateTime: 2023-11-05  10:32
 * @Description: TODO
 * @Version: 1.0
 */
public class 找到冠军I {

    public int findChampion(int[][] grid) {
        int result = 0;
        int index = 0;
        for (int i = 0; i < grid.length; i++) {
            int sum = 0;
            for (int j = 0; j < grid[0].length; j++) {
                sum += grid[i][j];
            }
            if (sum > result) {
                result = sum;
                index = i;
            }
        }
        return index;
    }
}
